package com.lovejes.cuniao.domain.base;

import java.io.Serializable;


/**
 * This is an object that contains data related to the cn_job table.
 * Do not modify this class because it will be overwritten if the configuration file
 * related to this class is modified.
 *
 * @hibernate.class
 *  table="cn_job"
 */

public abstract class BaseCnJob  implements Serializable {

	public static String REF = "CnJob";
	public static String PROP_NUM = "Num";
	public static String PROP_ID = "Id";
	public static String PROP_LEVEL = "Level";
	public static String PROP_PID = "Pid";
	public static String PROP_CREATETIME = "Createtime";
	public static String PROP_JOBNAME = "Jobname";


	// constructors
	public BaseCnJob () {
		initialize();
	}

	/**
	 * Constructor for primary key
	 */
	public BaseCnJob (java.lang.Integer id) {
		this.setId(id);
		initialize();
	}

	protected void initialize () {}



	private int hashCode = Integer.MIN_VALUE;

	// primary key
	private java.lang.Integer id;

	// fields
	private java.lang.String jobname;
	private java.lang.String pid;
	private java.lang.String level;
	private java.lang.String num;
	private java.util.Date createtime;



	/**
	 * Return the unique identifier of this class
     * @hibernate.id
     *  generator-class="native"
     *  column="ID"
     */
	public java.lang.Integer getId () {
		return id;
	}

	/**
	 * Set the unique identifier of this class
	 * @param id the new ID
	 */
	public void setId (java.lang.Integer id) {
		this.id = id;
		this.hashCode = Integer.MIN_VALUE;
	}




	/**
	 * Return the value associated with the column: JOBNAME
	 */
	public java.lang.String getJobname () {
		return jobname;
	}

	/**
	 * Set the value related to the column: JOBNAME
	 * @param jobname the JOBNAME value
	 */
	public void setJobname (java.lang.String jobname) {
		this.jobname = jobname;
	}



	/**
	 * Return the value associated with the column: PID
	 */
	public java.lang.String getPid () {
		return pid;
	}

	/**
	 * Set the value related to the column: PID
	 * @param pid the PID value
	 */
	public void setPid (java.lang.String pid) {
		this.pid = pid;
	}



	/**
	 * Return the value associated with the column: LEVEL
	 */
	public java.lang.String getLevel () {
		return level;
	}

	/**
	 * Set the value related to the column: LEVEL
	 * @param level the LEVEL value
	 */
	public void setLevel (java.lang.String level) {
		this.level = level;
	}



	/**
	 * Return the value associated with the column: NUM
	 */
	public java.lang.String getNum () {
		return num;
	}

	/**
	 * Set the value related to the column: NUM
	 * @param num the NUM value
	 */
	public void setNum (java.lang.String num) {
		this.num = num;
	}



	/**
	 * Return the value associated with the column: createtime
	 */
	public java.util.Date getCreatetime () {
		return createtime;
	}

	/**
	 * Set the value related to the column: createtime
	 * @param createtime the createtime value
	 */
	public void setCreatetime (java.util.Date createtime) {
		this.createtime = createtime;
	}




	public boolean equals (Object obj) {
		if (null == obj) return false;
		if (!(obj instanceof com.lovejes.cuniao.domain.CnJob)) return false;
		else {
			com.lovejes.cuniao.domain.CnJob cnJob = (com.lovejes.cuniao.domain.CnJob) obj;
			if (null == this.getId() || null == cnJob.getId()) return false;
			else return (this.getId().equals(cnJob.getId()));
		}
	}

	public int hashCode () {
		if (Integer.MIN_VALUE == this.hashCode) {
			if (null == this.getId()) return super.hashCode();
			else {
				String hashStr = this.getClass().getName() + ":" + this.getId().hashCode();
				this.hashCode = hashStr.hashCode();
			}
		}
		return this.hashCode;
	}


	public String toString () {
		return super.toString();
	}


}